Skip to content

Conversation

@miklcct
Copy link
Contributor

@miklcct miklcct commented Apr 7, 2025

Summary

The maximum speed to validate stop times (where issue reports are generated) is increased for SUBWAY and RAIL modes to reflect latest technological advances.

For example, the Beijing - Shanghai high speed train now averages over 300 km/h throughout its journey, and now Guangzhou has metro lines of 160 km/h running speed.

Issue

None

Unit tests

None

Documentation

N/A

Changelog

Not needed

Bumping the serialization version id

Not needed

@miklcct miklcct marked this pull request as ready for review April 7, 2025 15:11
@miklcct miklcct requested a review from a team as a code owner April 7, 2025 15:11
@optionsome optionsome added the +Skip Changelog This is not a relevant change for a product owner since last release. label Apr 8, 2025
@optionsome optionsome requested review from abyrd and optionsome April 8, 2025 09:26
@optionsome
Copy link
Member

Btw @miklcct, do you have data sets where you run into this problem? I'm not personally against this type of a change even if you aren't facing the issue of now but this information could still be useful when we make the decision on if we should change these limits. Also, what does "running speed" mean? Is it the maximum speed or some average that takes into account slowing down, acceleration and opening/closing doors? Metro stops aren't typically that far apart so those do affect the average a bit.

@miklcct
Copy link
Contributor Author

miklcct commented Apr 10, 2025

Btw @miklcct, do you have data sets where you run into this problem? I'm not personally against this type of a change even if you aren't facing the issue of now but this information could still be useful when we make the decision on if we should change these limits. Also, what does "running speed" mean? Is it the maximum speed or some average that takes into account slowing down, acceleration and opening/closing doors? Metro stops aren't typically that far apart so those do affect the average a bit.

This problem hasn't been encountered in GB yet (as the maximum train speed is 225 km/h) but it may be of interest in some other countries with faster high speed trains.

The 160 km/h on metro trains refer to the maximum line and train speed. However, with skip-stopping metro services, the current limit in OTP can be exceeded on those lines. The Guangzhou Metro line 18 has a 25.8 km non-stop section between Panyu and the city, so the limit is exceeded with 160 km/h running for such a long distance. It is called a high-speed metro because it is built to higher-speed rail standard, but it is regulated and operated as a metro service inside the metro network.

@miklcct
Copy link
Contributor Author

miklcct commented Apr 10, 2025

The GTFS validator uses the following values:

Route type Description Threshold, km/h
0 Light rail 100
1 Subway 150
2 Rail 500
3 Bus 150
4 Ferry 80
5 Cable tram 30
6 Aerial lift 50
7 Funicular 50
11 Trolleybus 150
12 Monorail 150

  • Unknown 200

Should we do the same in OTP as well?

@optionsome optionsome changed the title increase values in getMaxSpeedForMode Increase maximum allowed speeds in validation for subway and rail Apr 14, 2025
@optionsome optionsome changed the title Increase maximum allowed speeds in validation for subway and rail Increase maximum allowed speed in validation for subway and rail Apr 14, 2025
@optionsome
Copy link
Member

Lets just use the GTFS validator values.

@codecov
Copy link

codecov bot commented Apr 15, 2025

Codecov Report

Attention: Patch coverage is 60.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 71.03%. Comparing base (c6b53d1) to head (b8b5960).
Report is 14 commits behind head on dev-2.x.

Files with missing lines Patch % Lines
...le/ValidateAndInterpolateStopTimesForEachTrip.java 60.00% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #6606      +/-   ##
=============================================
- Coverage      71.04%   71.03%   -0.01%     
- Complexity     18297    18299       +2     
=============================================
  Files           2005     2005              
  Lines          75850    75855       +5     
  Branches        7779     7780       +1     
=============================================
+ Hits           53884    53887       +3     
- Misses         19221    19224       +3     
+ Partials        2745     2744       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@miklcct miklcct changed the title Increase maximum allowed speed in validation for subway and rail Adjust the maximum allowed speed in our stop time validator to be consistent with MobilityData GTFS validator Apr 15, 2025
Copy link
Member

@abyrd abyrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think using the same values from the MobilityData validator is a reasonable solution.

@optionsome optionsome removed the +Skip Changelog This is not a relevant change for a product owner since last release. label Apr 24, 2025
@optionsome
Copy link
Member

I've removed the skip changelog label that I added previously since this probably should belong in the changelog so it's easier for someone to figure out if this causes issues for someone.

@optionsome optionsome merged commit f594a27 into opentripplanner:dev-2.x Apr 24, 2025
7 checks passed
t2gran pushed a commit that referenced this pull request Apr 24, 2025
@miklcct miklcct deleted the max-speed-for-mode branch May 6, 2025 09:49
@t2gran t2gran added this to the 2.8 (next release) milestone Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants